<?php include( "templates/include/header.php"); ?>

<?php
  function pictures( $imageList ) {
    echo( '<td width="300px" valign="top" style="margin:0;padding:0" align="left">'."\n".
      '<div class="CycleFade1" align="left" style="margin:0;padding:0;width:300px;height:200px">'."\n" );
      foreach( $imageList['results'] as $image ) {
        echo( '<img class="InfosBoxL"  src="'.$image['image'].'" width="300px" height="200px"/>'."\n");
      }
      echo( '</div>'."\n".
    '</td>'."\n" );
  }?>

<?php
  function content( $anim ) { ?>
    <td valign="middle" align="justify">
        <?php echo $anim->content ?>
      </td>
  <?php }?>

<?php 
$bool = True;  
foreach( $results['anim'] as $anim ) { ?>
  <table align="center" width="90%" cellpadding="5px" cellspacing="0" border="0">
  	<tr height="230px">
    <?php
      $list = array();
      $list = $anim->getImages();
      if( $bool ) {
        pictures( $list );
        content( $anim );
        $bool = False;
      }
      else {
        content( $anim );
        pictures( $list );
        $bool = True;
      }?>
    </tr>
  </table>
<?php } ?>

<?php include( "templates/include/footer.php"); ?>
